import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

import App from '../App.vue'

// 老年大学 - 首页；
const home = () => import('@/pages/home/index')
// 老年大学 - 寄送信息页；
const sendMsg = () => import('@/pages/sendMsg/index')
// 老年大学 - 联系我们；
const contactUs = () => import('@/pages/contactUs/index')
// 老年大学 - 报名；
const signUp = () => import('@/pages/signUp/index')
// 老年大学 - 报名 - 预借规则；
const agreement = () => import('@/pages/agreement/index')
// 老年大学 - 我的绩效；
const myPerformance = () => import('@/pages/myPerformance/index')
// 老年大学 - 我的绩效 - 报名码；
const myPerformanceCode = () => import('@/pages/myPerformance/code')
// 老年大学 - 登录页；
const reLogin = () => import('@/pages/reLogin/index')
// 老年大学 - 全国校园展播 - 首页；
const schoolExhibition = () => import('@/pages/schoolExhibition/index')
// 老年大学 - 全国校园展播 - 详情页；
const schoolExhibitionDetails = () => import('@/pages/schoolExhibition/details')

const routes = [
  {
    path: '/',
    component: App,
    children:[
      {
        path: '/',  // 默认进入路由
        redirect: 'home'   //重定向'
      },
      {
        path: '/home',
        name: 'home',
        component: home,
      },
      {
        path: '/sendMsg',
        name: 'sendMsg',
        component: sendMsg,
      },
      {
        path: '/contactUs',
        name: 'contactUs',
        component: contactUs,
      },
      {
        path: '/signUp',
        name: 'signUp',
        component: signUp,
      },
      {
        path: '/agreement',
        name: 'agreement',
        component: agreement,
      },
      {
        path: '/myPerformance',
        name: 'myPerformance',
        component: myPerformance,
      },
      {
        path: '/myPerformanceCode',
        name: 'myPerformanceCode',
        component: myPerformanceCode,
      },
      //重新登录
      {
        path: '/reLogin',
        name: 'reLogin',
        component: reLogin
      },
      //全国校园展播
      {
        path: '/schoolExhibition',
        name: 'schoolExhibition',
        component: schoolExhibition
      },
      //全国校园展播 详情页
      {
        path: '/schoolExhibitionDetails',
        name: 'schoolExhibitionDetails',
        component: schoolExhibitionDetails
      }

    ]
  }
]
export default new Router({
  mode: 'history',
  routes
})
